#{extends 'main.html' /}
*{allNotifications is avail.}*
<h2>Notifications</h2><hr/>

#{list items:allNotifications, as:'notify'}
	#{if notify.status}
		<span style="color:#9A2EFE"><font size="3">${notify.title}<br></font></span>
		${notify.main}&nbsp;<font size="1"><i>${notify.date.getTime()}</font></i><br>	
	#{/if}
	#{else}
		<b><span style="color:#9A2EFE"><font size="3">${notify.title}<br></font></span></b>
		<b>${notify.main}&nbsp;<font size="1"><i>${notify.date.getTime()}</font></i><br></b>	
	#{/else}
#{/list}

<script type="text/javascript">	
	$(document).ready(function(){
		var userId = '${session.get("userId")}';
		$.post('@{Notifications.markAllAsRead()}',{userId: userId}, function(){
			
		});
	});
</script>